#coding:utf-8

class OrganRegisterDomain

  def self.all
    OrganRegisterRepo.all.map(&:organ_id).uniq.map do |oid|
      OrganRegisterRepo.group(oid)
    end
  end
  

  def self.create params
    record = OrganRegisterRepo.create(params)
    OrganRegisterRepo.group(record.organ_id)
  end
end
